#ifndef _CKTHREAD_H_
#define _CKTHREAD_H_



#include <thread>

namespace K_Engine
{
	typedef std::string (*popworkCallBack)(void*);
	typedef void  (*resultCallBack)(void*, std::string);

	class CKThread
	{
	private:
		popworkCallBack m_popworkcallback;
		resultCallBack m_resultcallback;
		void *m_pthreadpool;
		void *m_pushresult;
		bool m_isWork;
		bool m_isAlive;
		std::thread *m_pthread;
		
	public:
		CKThread(
			popworkCallBack _popworkcallback, 
			void* _threadpool,
			resultCallBack _resultcallback, 
			void* _pushreslut);
		~CKThread();
		bool bGetIsWork();
		void ChangeIsAlive(bool _bisalive);
		
	private:
		void run();
	};
}

#endif // ! _CKTHREAD_H_
